package com.jc.ds.model;

/**
 * game_user
 * @author 
 */
public class GameUser extends BaseValueObject {
    private Long id;

    private Long userId;

    private String userPic;

    /**
     * 昵称
     */
    private String userNickName;

    /**
     * 是否同意平台条约
     */
    private String isAgree;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserPic() {
        return userPic;
    }

    public void setUserPic(String userPic) {
        this.userPic = userPic;
    }

    public String getUserNickName() {
        return userNickName;
    }

    public void setUserNickName(String userNickName) {
        this.userNickName = userNickName;
    }

    public String getIsAgree() {
        return isAgree;
    }

    public void setIsAgree(String isAgree) {
        this.isAgree = isAgree;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByUserId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_id asc";
            }else{
                this.orderStr = this.orderStr + ",user_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_id desc";
            }else{
                this.orderStr = this.orderStr + ",user_id desc";
            }
        }
    }

    public void orderByUserPic(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_pic asc";
            }else{
                this.orderStr = this.orderStr + ",user_pic asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_pic desc";
            }else{
                this.orderStr = this.orderStr + ",user_pic desc";
            }
        }
    }

    public void orderByUserNickName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_nick_name asc";
            }else{
                this.orderStr = this.orderStr + ",user_nick_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_nick_name desc";
            }else{
                this.orderStr = this.orderStr + ",user_nick_name desc";
            }
        }
    }

    public void orderByIsAgree(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by is_agree asc";
            }else{
                this.orderStr = this.orderStr + ",is_agree asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by is_agree desc";
            }else{
                this.orderStr = this.orderStr + ",is_agree desc";
            }
        }
    }
}